﻿using NExt.Core.Model.Base;

namespace NExt
{
    public class Button : Button<ButtonEvents>
    {
    }

    public abstract class Button<TEvents> : Component<TEvents>
        where TEvents : ButtonEvents, new()
    {
        public bool? allowDepress { get; set; }
        public string buttonSelector { get; set; }
        public string clickEvent { get; set; }
        public bool? enableToggle { get; set; }
        public bool? handleMouseEvents { get; set; }
        public IScript handler { get; set; }
        public string icon { get; set; }
        public string iconCls { get; set; }
        public object menu { get; set; } //TODO: return type
        public string menuAlign { get; set; }
        public int? minWidth { get; set; }
        public bool? pressed { get; set; }
        public bool? repeat { get; set; } //TODO: return type
        public object scope { get; set; }
        public int? tabIndex { get; set; }
        public Template template { get; set; }
        public string text { get; set; }
        public string toggleGroup { get; set; }
        public string toggleHandler { get; set; }
        public object tooltip { get; set; } //TODO: return type
        public string tooltipType { get; set; }
        public string type { get; set; }
    }

    public class ButtonEvents : ComponentEvents
    {
        public IScript click { get; set; }
        public IScript menuhide { get; set; }
        public IScript menushow { get; set; }
        public IScript menutriggerout { get; set; }
        public IScript menutriggerover { get; set; }
        public IScript mouseout { get; set; }
        public IScript mouseover { get; set; }
        public IScript toggle { get; set; }

    }
}
